package com.igeek.boot.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author jwj
 * @since 2023-12-26
 */
@Data
@TableName("shelves")
@ApiModel(value="Shelves对象", description="")
public class Shelves implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "货架ID（ShelfID）：唯一标识每个货架的ID")
    @TableId(value = "shelfID", type = IdType.AUTO)
    private Integer shelfID;

    @ApiModelProperty(value = "货架名称（ShelfName）：货架的名称")
    private String shelfName;

    @ApiModelProperty(value = "货架类型（ShelfType）：货架的类型")
    private String shelfType;

    @ApiModelProperty(value = "存储空间（StorageSpace）：货架的存储空间")
    private Integer storageSpace;

    @ApiModelProperty(value = "货架的创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "货架的修改时间")
    @TableField(value = "update_time" ,fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "货架是否被删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "外键:关联物资表的主键ID")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "货架中的物资")
    @TableField(exist = false)
    private List<Assets> assets;

    //一对一所属仓库名
    @ApiModelProperty(value = "所属的仓库名")
    @TableField(exist = false)
    private String warehouseName;
}
